<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://beta.mamsy.ru/" />
<title>активация_акций</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">активация_акций</td></tr>
</thead><tbody>
<tr>
	<td>setSpeed</td>
	<td>0</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>/</td>
	<td></td>
</tr>
<tr>
	<td>storeEval</td>
	<td>if (selenium.isElementPresent(&quot;id=input-login_mail&quot;)==true){nextMove=&quot;login&quot;} else {nextMove=&quot;exit&quot;}</td>
	<td>loginPage</td>
</tr>
<tr>
	<td>gotolabel</td>
	<td>${loginPage}</td>
	<td></td>
</tr>
<tr>
	<td>label</td>
	<td>exit</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>id=logout</td>
	<td></td>
</tr>
<tr>
	<td>label</td>
	<td>login</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=input-login_mail</td>
	<td>39@mailforspam.com</td>
</tr>
<tr>
	<td>click</td>
	<td>css=input.button__button</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>id=loginMessages</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=#login-pass_view &gt; label.content__form__text__bg</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=input-login_pass</td>
	<td>111111</td>
</tr>
<tr>
	<td>click</td>
	<td>css=input.button__button</td>
	<td></td>
</tr>
<tr>
	<td>store</td>
	<td>30</td>
	<td>i</td>
</tr>
<tr>
	<td>label</td>
	<td>Discount1</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>/call/content</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>css=table.orders_table</td>
	<td></td>
</tr>
<tr>
	<td>waitForPageToLoad</td>
	<td></td>
	<td></td>
</tr>
<tr>
	<td>storeEval</td>
	<td>if (selenium.isElementPresent(&quot;//tr[${i}]/td[2]/a&quot;)== true){nextMove=&quot;nextMove&quot;} else {nextMove=&quot;Discount&quot;}</td>
	<td>nextMove</td>
</tr>
<tr>
	<td>gotolabel</td>
	<td>${nextMove}</td>
	<td></td>
</tr>
<tr>
	<td>echo</td>
	<td>${i}</td>
	<td></td>
</tr>
<tr>
	<td>label</td>
	<td>nextMove</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>//tr[${i}]/td[2]/a</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>id=date_end</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>id=date_start</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=date_start</td>
	<td>2012-08-28 09:00:00</td>
</tr>
<tr>
	<td>type</td>
	<td>id=date_end</td>
	<td>2012-08-31 09:00:00</td>
</tr>
<tr>
	<td>type</td>
	<td>id=meta_title</td>
	<td>1</td>
</tr>
<tr>
	<td>click</td>
	<td>css=button.kd-button.kd-button-submit</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>id=d_sale_error</td>
	<td></td>
</tr>
<tr>
	<td>while</td>
	<td>${i}&lt;2000</td>
	<td></td>
</tr>
<tr>
	<td>label</td>
	<td>Discount</td>
	<td></td>
</tr>
<tr>
	<td>storeEval</td>
	<td>${i}+1</td>
	<td>i</td>
</tr>
<tr>
	<td>echo</td>
	<td>${i}</td>
	<td></td>
</tr>
<tr>
	<td>gotolabel</td>
	<td>Discount1</td>
	<td></td>
</tr>
<tr>
	<td>endWhile</td>
	<td></td>
	<td></td>
</tr>
</tbody></table>
</body>
</html>
